package com.soft.base.util;
/**
 * class
 *
 * @author user
 * @date 2020/06/05
 */
public class MathUtil {
    public static double limit(double value, double min, double max) {
        if (value > max) {
            return max;
        } else if (value < min) {
            return min;
        }
        return value;
    }

    public static boolean in(int value, int min, int max) {
        return value >= min && value <= max;
    }

}
